package com.example.asus.myapplication;

import android.test.ActivityInstrumentationTestCase2;

import com.example.myprojectoffeixue.LoginActivity;
import com.example.myprojectoffeixue.ReginActivity;
import com.example.myprojectoffeixue.WangJiMMActivity;
import com.robotium.solo.Solo;

/**
 * Created by ASUS on 2016/9/26.
 */
public class ReginTest extends ActivityInstrumentationTestCase2 {

    private Solo solo;

    public ReginTest() {
        super(ReginActivity.class);
    }

    @Override
    public void setUp() throws Exception {
        super.setUp();
        solo = new Solo(getInstrumentation(), getActivity());
    }

    public void testregin() throws  Exception{
        solo.enterText(solo.getEditText(0),"15639767013");
        solo.enterText( solo.getEditText(2),"yuyang123456");
        solo.enterText( solo.getEditText(3),"yuyang123456");
        solo.clickOnText("获取验证码");
        solo.clickOnText("注册");
        solo.sleep(3000);
    }

    public void testregin2() throws  Exception{

        solo.clearEditText(solo.getEditText(0));
        solo.clickOnText("获取验证码");
    }
    public void testregin4() throws  Exception{
        solo.enterText(solo.getEditText(0),"12345678912");
        solo.clearEditText(solo.getEditText(0));
        solo.clickOnText("获取验证码");

    }

    public void testregin3() throws  Exception{
        solo.clearEditText(solo.getEditText(1));
        solo.clearEditText(solo.getEditText(2));
        solo.clearEditText(solo.getEditText(3));
        solo.clickOnText("注册");

    }

    public void testregin5() throws  Exception{
        solo.clearEditText(solo.getEditText(0));
        solo.clearEditText(solo.getEditText(1));
        solo.clearEditText(solo.getEditText(2));
        solo.clearEditText(solo.getEditText(3));
        solo.enterText(solo.getEditText(0),"15639767013");
        solo.enterText(solo.getEditText(1),"1234");
        solo.enterText( solo.getEditText(2),"123456");
        solo.enterText( solo.getEditText(3),"123456");
        solo.clickOnText("注册");

    }










}
